package messagesPacks;

import java.util.ArrayList;
import java.util.Hashtable;

import Entity.Book;
import messagesPacks.GenericMessage.msgType;

/**
 * This class representing a LibrarianEditBookMessage
 * Date: 30/12/2012
 * @author Tali Pisarev
 *
 */
public class LibrarianEditBookMessage extends GenericMessage 
{

	private static final long serialVersionUID = 1L;
	
	 /**Book is entity that includes all the details of book*/
	private Book book;
	 /**save the Query result*/
	private int queryEditBookResult=-10;
	 /**Hashtable-BookSubjects save all the subjects of book*/
	private Hashtable<Integer,String> BookSubjects; 
	
/**
* Constructor the LibrarianEditBookMessage with default values
*/	
	public LibrarianEditBookMessage()
	{
		this.type = msgType.LibrarianEditBookMSG;
		this.book = new Book();
		BookSubjects = new Hashtable<Integer,String>();

	}
	
	

//===================================================================	
//                  Getters & Setters
//===================================================================	
	
 public Book getBook()
	{
		return book;
	}

	public void setBook(Book book)
	{
		this.book = book;
	}

	public int getQueryLibEditBookResult()
	{
		return queryEditBookResult;
	}


	public void setQueryLibEditBookResult (int queryEditBookResult)
	{
		this.queryEditBookResult = queryEditBookResult;
	}


	public Hashtable<Integer,String> getBookSubjects()
	{
		return this.BookSubjects;
	}
	
	public void setBookSubjects(Hashtable<Integer,String> subjects)
	{
		if(!subjects.isEmpty())
		  {
			this.BookSubjects.putAll(subjects)  ; 
		  }
	}
	
	

}//class
